package com.coffee.sku.service.sku.dao;

import com.coffee.sku.api.sku.query.RegionalSkuSalesInformationQuery;
import com.coffee.sku.api.sku.req.MerchantSkuListReq;
import com.coffee.sku.api.sku.req.SkuListReq;
import com.coffee.sku.api.sku.result.PeriodizationRegionalSkuResult;
import com.coffee.sku.api.sku.result.RegionalSkuIdAndPriceResult;
import com.coffee.sku.api.sku.result.RegionalSkuSalesInformationResult;
import com.coffee.sku.service.sku.bean.RegionalSkuSalesInformation;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RegionalSkuSalesInformationDao {
    public RegionalSkuSalesInformation findById(Integer id);

    public RegionalSkuSalesInformation findByIdForUpdate(Integer id);

    public List<RegionalSkuSalesInformation> findByIds(@Param("idList") List<Integer> idList);

    public Integer count(@Param("param") RegionalSkuSalesInformationQuery param);

    public List<RegionalSkuSalesInformation> page(@Param("param") RegionalSkuSalesInformationQuery param, @Param("offset") Integer offset, @Param("rows") Integer rows);

    public List<RegionalSkuSalesInformation> list(@Param("param") RegionalSkuSalesInformationQuery param);

    public RegionalSkuSalesInformation findFirst(@Param("param") RegionalSkuSalesInformationQuery param);

    public Integer insert(RegionalSkuSalesInformation param);

    Integer insertBatch(List<RegionalSkuSalesInformation> list);

    public void updateById(@Param("param") RegionalSkuSalesInformation param);

    public void updateBySkuSalesInformationIdId(@Param("param") RegionalSkuSalesInformation param);

    public Integer deleteById(Integer id);

    public Integer deleteBySkuId(@Param("skuId") Integer skuId, @Param("type") String type, @Param("hostSkuId") Integer hostSkuId);

    public Integer deleteBySkuSalesInformationId(Integer skuSalesInformationId);

    public Integer deleteBySkuSalesInformationIds(@Param("list") List<Integer> idList, @Param("type") String type);

    public Integer deleteBySkuSalesInformationIdAndCity(@Param("skuSalesInformationId") Integer skuSalesInformationId, @Param("cityId") Integer cityId);

    public Integer deleteByIds(List<Integer> idList);

    public List<RegionalSkuSalesInformationResult> findSkuSalesInformationId(@Param("skuId") Integer skuId, @Param("type") String type);

    public List<PeriodizationRegionalSkuResult> findPeriodizationRegionalSkuResult(@Param("id") Integer id, @Param("skuId") Integer skuId, @Param("hostSkuId") Integer hostSkuId);

    public List<RegionalSkuIdAndPriceResult> getSkuIds(@Param("param") MerchantSkuListReq param, @Param("offset") Integer offset, @Param("rows") Integer rows);

    public Integer getSkuIdsCount(@Param("param") MerchantSkuListReq param);

    public Integer skuCount(@Param("param") SkuListReq param);

    public List<Integer> getSkuIdsByPage(@Param("param") MerchantSkuListReq param, @Param("offset") Integer offset, @Param("rows") Integer rows);

    public List<Integer> getSkuIdsByReq(@Param("param") SkuListReq param, @Param("offset") Integer offset, @Param("rows") Integer rows);

    public List<String> getCategoryPidPaths(@Param("param") MerchantSkuListReq param);

}